package com.hugboy.string;

import com.hugboy.domain.Student;

import java.util.Scanner;

public class Demo9split {
    public static void main(String[] args) {
        System.out.println("input stu info:");
        Scanner sc = new Scanner(System.in);
        String scStr = sc.nextLine();
        String[] sArr = scStr.split(",");

        // 封装
        Student stu = new Student(sArr[0], sArr[1]);
        System.out.println(stu.getName()+"..."+stu.getAge());
    }
}
